/**
 * @ClassName Way
 * @Description TODO 路线对象
 * @Author admin
 * @Date 2020/6/30 15:31
 * @Version 1.0
 **/
public class Way {

    // 出发城市
    private String from;
    // 终点城市
    private String to;
    // 总距离
    private Double distinct;

    public Way(String from, String to, Double distinct) {
        this.from = from;
        this.to = to;
        this.distinct = distinct;
    }

    public Way() {
    }

    public String getFrom() {
        return from;
    }

    public void setFrom(String from) {
        this.from = from;
    }

    public String getTo() {
        return to;
    }

    public void setTo(String to) {
        this.to = to;
    }

    public Double getDistinct() {
        return distinct;
    }

    public void setDistinct(Double distinct) {
        this.distinct = distinct;
    }

    @Override
    public boolean equals(Object obj) {
        Way obj1 = (Way) obj;
        if (obj1.getFrom().equalsIgnoreCase(this.from)
                && obj1.getTo().equalsIgnoreCase(this.to)
                && obj1.getDistinct() ==  this.distinct) {
            return true;
        }
        return false;
    }
}
